<!-- src/layouts/MainLayout.vue -->
<template>
  <el-container class="home-container">
    <!-- 头部 -->
    <Header />
    
    <!-- 主体部分 -->
    <el-container>
      <!-- 侧边栏 -->
      <Sidebar />
      
      <!-- 主内容区 -->
      <el-main class="main-content">
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script setup>
import Header from '@/components/Header.vue'
import Sidebar from '@/components/Sidebar.vue'
</script>

<style scoped>
.home-container {
  height: 100vh;
}

.main-content {
  padding: 20px;
  margin-left: 220px; /* 与侧边栏宽度一致 */
  margin-top: 60px; /* 与头部高度一致 */
}
</style>